VT-d: fix and improve print_vtd_entries()
authorKeir Fraser <keir@xen.org>
Fri, 24 Dec 2010 10:14:01 +0000 (10:14 +0000)
committerKeir Fraser <keir@xen.org>
Fri, 24 Dec 2010 10:14:01 +0000 (10:14 +0000)
commit3f7f21343b4090115c47fa29476864a92efc01af
tree4a6e6e2166990867b7cb871bbeb3dbcbad60ec63
parent7e509984bd3dc06f270205a79fbcc79e51254d83
VT-d: fix and improve print_vtd_entries()

Fix leaking of mapped domain pages (root_entry and ctxt_entry when
falling out of the level traversing loop). Do this by re-arranging
things slightly so that a mapping is retained only as long as it
really is needed.

Fix the failure to use map_domain_page() in the level traversing loop
of the function.

Add a mssing return statement in one of the error paths.

Also I wonder whether not being able to call print_vtd_entries() from
iommu_page_fault_do_one() in ix86 is still correct, now that
map_domain_page() is IRQ safe.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen/drivers/passthrough/vtd/utils.c